package com.study.init;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.event.ApplicationStartedEvent;
import org.springframework.context.event.ContextClosedEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class ApplicationInitListener {

	@EventListener
	public void appStartEvent(ApplicationStartedEvent event) {
		log.info("app start...");
	}

	@EventListener
	public void appCloseEvent(ContextClosedEvent event) {
		log.info("app stop...");
	}
}
